﻿
namespace SharpTalk.Client.WpfApplication.Views
{
    using System.Reflection;
    using ViewModels;
    /// <summary>
    /// Interaction logic for MessageView.xaml
    /// </summary>
    public partial class DialogMessageView : WindowBase, IDialogMessageView
    {
        public DialogMessageView()
        {
            InitializeComponent();
        }

        public DialogMessageView(DialogMessageViewModel viewModel)
            : this()
        {
            DataContext = viewModel;
        }

        
        public void ShowMessage(string title, string message, bool isError)
        {
            if (App.Trace != null)
                App.Trace.TraceMethodCall(MethodBase.GetCurrentMethod());
            ShowDialog();
        }
        public void ShowMessage(string message, bool isError)
        {
            if (App.Trace != null)
                App.Trace.TraceMethodCall(MethodBase.GetCurrentMethod());
            ShowDialog();
        }
        public bool? ShowDialogMessage(string title, string message, bool isError, bool showOkCancel, bool showYesNo)
        {
            if (App.Trace != null)
                App.Trace.TraceMethodCall(MethodBase.GetCurrentMethod());
            return ShowDialog();
        }
        public bool? ShowDialogMessage(string title, string message, bool isError, bool showOk, bool showCancel, bool showYesNo)
        {
            if (App.Trace != null)
                App.Trace.TraceMethodCall(MethodBase.GetCurrentMethod());
            return ShowDialog();
        }
    }
}
